﻿<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <title>商品页面</title>

    <link href="../AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet"
          type="text/css"/>
    <link href="../AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet"
          type="text/css"/>
    <link href="../basic/css/demo.css" rel="stylesheet" type="text/css"/>
    <link type="text/css" href="../css/optstyle.css" rel="stylesheet"/>
    <link type="text/css" href="../css/style.css" rel="stylesheet"/>

    <script type="text/javascript" src="../basic/js/jquery-1.7.min.js"></script>
    <script type="text/javascript" src="../basic/js/quick_links.js"></script>

    <script type="text/javascript"
            src="../AmazeUI-2.4.2/assets/js/amazeui.js"></script>
    <script type="text/javascript" src="../js/jquery.imagezoom.min.js"></script>
    <script type="text/javascript" src="../js/jquery.flexslider.js"></script>
    <script type="text/javascript" src="../js/list.js"></script>

</head>

<body>


<!--顶部导航条 -->
<div class="am-container header">
    <ul class="message-l">
        <div class="topMessage">
<!--            <div class="menu-hd">-->
<!--                <a href="#" target="_top" class="h">亲，请登录</a> <a href="#"-->
<!--                                                                 target="_top">免费注册</a>-->
<!--            </div>-->
        </div>
    </ul>
    <ul class="message-r">
        <div class="topMessage home">
            <div class="menu-hd">
                <a href="./home.html" target="_top" class="h">商城首页</a>
            </div>
        </div>
        <div class="topMessage my-shangcheng">
            <div class="menu-hd MyShangcheng">
                <a href="../person/index.html" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a>
            </div>
        </div>
        <div class="topMessage mini-cart">
            <div class="menu-hd">
                <a id="mc-menu-hd" href="./shopcart.html" target="_top"><i
                        class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span><strong
                        id="J_MiniCartNum" class="h">0</strong></a>
            </div>
        </div>
        <div class="topMessage favorite">
            <div class="menu-hd">
<!--                <a href="#" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a>-->
            </div>
        </div>
    </ul>
</div>

<!--悬浮搜索框-->

<div class="nav white">
    <div class="logo">
        <img src="../images/logo.png"/>
    </div>
    <div class="logoBig">
        <li><img src="../images/logobig.png"/></li>
    </div>
    <div class="search-bar pr">
        <a name="index_none_header_sysc" href="#"></a>
        <form>
            <input id="searchInput" name="index_none_header_sysc" type="text" placeholder="搜索" autocomplete="off">
            <input id="ai-topsearch" class="submit am-btn" value="搜索" index="1" type="button">
        </form>
    </div>
</div>
<script type="text/javascript">
    //点击搜索按钮
    $("#ai-topsearch").click(function (){
        if ($("#searchInput").val().length==0){
            layer.msg('未输入关键字!', {icon: 1, time: 1000});
            return;
        }
        location.href="./search.html?key="+$("#searchInput").val();
    });
</script>
<div class="clear"></div>
<b class="line"></b>
<div class="listMain">

    <!--分类-->
    <div class="nav-table">
        <div class="long-title">
            <span class="all-goods">全部分类</span>
        </div>
        <div class="nav-cont">
            <ul>
                <li class="index"><a href="#">首页</a></li>
                <li class="qc"><a href="#">闪购</a></li>
                <li class="qc"><a href="#">限时抢</a></li>
                <li class="qc"><a href="#">团购</a></li>
                <li class="qc last"><a href="#">大包装</a></li>
            </ul>
            <div class="nav-extra">
                <i class="am-icon-user-secret am-icon-md nav-user"></i><b></b>我的福利
                <i class="am-icon-angle-right" style="padding-left: 10px;"></i>
            </div>
        </div>
    </div>
    <ol class="am-breadcrumb am-breadcrumb-slash">
        <li><a href="#">首页</a></li>
        <li><a href="#">分类</a></li>
        <li class="am-active">内容</li>
    </ol>
    <script type="text/javascript">
        $(function () {
        });
        $(window).load(function () {
            $('.flexslider').flexslider({
                animation: "slide",
                start: function (slider) {
                    $('body').removeClass('loading');
                }
            });
        });
    </script>
    <div class="scoll">
        <section class="slider">
            <div class="flexslider">
                <ul class="slides">
                    <li><img src="../images/01.jpg" title="pic"/></li>
                    <li><img src="../images/02.jpg"/></li>
                    <li><img src="../images/03.jpg"/></li>
                </ul>
            </div>
        </section>
    </div>

    <!--放大镜-->

    <div class="item-inform">
        <div class="clearfixLeft" id="clearcontent">

            <div class="box">
                <script type="text/javascript">
                    $(document).ready(
                        function () {
                            $(".jqzoom").imagezoom();
                            $("#thumblist li a").click(
                                function () {
                                    $(this).parents("li").addClass(
                                        "tb-selected")
                                        .siblings()
                                        .removeClass(
                                            "tb-selected");
                                    $(".jqzoom").attr(
                                        'src',
                                        $(this).find("img")
                                            .attr("mid"));
                                    $(".jqzoom").attr(
                                        'rel',
                                        $(this).find("img")
                                            .attr("big"));
                                });
                        });
                </script>

                <div class="tb-booth tb-pic tb-s310">
                    <a class="a-img" href="../images/01.jpg">
                        <img src="../images/01_mid.jpg" alt="细节展示放大镜特效" rel="../images/01.jpg" class="jqzoom"/></a>
                </div>
                <ul class="tb-thumb" id="thumblist">
                    <li class="tb-selected">
                        <div class="tb-pic tb-s40">
                            <a href="#"><img class="img1" src="../images/01_small.jpg"
                                             mid="../images/01_mid.jpg" big="../images/01.jpg"></a>
                        </div>
                    </li>
                    <li>
                        <div class="tb-pic tb-s40">
                            <a href="#"><img class="img2" src="../images/02_small.jpg"
                                             mid="../images/02_mid.jpg" big="../images/02.jpg"></a>
                        </div>
                    </li>
                    <li>
                        <div class="tb-pic tb-s40">
                            <a href="#"><img class="img3" src="../images/03_small.jpg"
                                             mid="../images/03_mid.jpg" big="../images/03.jpg"></a>
                        </div>
                    </li>
                    <li>
                        <div class="tb-pic tb-s40">
                            <a href="#"><img class="img4" src="../images/02_small.jpg"
                                             mid="../images/02_mid.jpg" big="../images/02.jpg"></a>
                        </div>
                    </li>
                    <li>
                        <div class="tb-pic tb-s40">
                            <a href="#"><img class="img5" src="../images/03_small.jpg"
                                             mid="../images/03_mid.jpg" big="../images/03.jpg"></a>
                        </div>
                    </li>
                </ul>
            </div>

            <div class="clear"></div>
        </div>

        <div class="clearfixRight">

            <!--规格属性-->
            <!--名称-->
            <div class="tb-detail-hd">
                <h1 class="h1-ti"></h1>
            </div>
            <div class="tb-detail-list">
                <!--价格-->
                <div class="tb-detail-price">
                    <li class="price iteminfo_price">
                        <dt>促销价</dt>
                        <dd>
                            <em>¥</em><b class="sys_item_price"></b>
                        </dd>
                    </li>
                    <li class="price iteminfo_mktprice">
                        <dt>原价</dt>
                        <dd>
                            <em>¥</em><b class="sys_item_mktprice"></b>
                        </dd>
                    </li>
                    <div class="clear"></div>
                </div>

                <!--地址-->
                <dl class="iteminfo_parameter freight">
                    <!--                    <dt>配送至</dt>-->
                    <!--                    <div class="iteminfo_freprice">-->
                    <!--                        <div class="am-form-content address">-->
                    <!--                            <select data-am-selected>-->
                    <!--                                <option value="a">浙江省</option>-->
                    <!--                                <option value="b">湖北省</option>-->
                    <!--                            </select> <select data-am-selected>-->
                    <!--                            <option value="a">温州市</option>-->
                    <!--                            <option value="b">武汉市</option>-->
                    <!--                        </select> <select data-am-selected>-->
                    <!--                            <option value="a">瑞安区</option>-->
                    <!--                            <option value="b">洪山区</option>-->
                    <!--                        </select>-->
                    <!--                        </div>-->
                    <!--                        <div class="pay-logis">-->
                    <!--                            快递<b class="sys_item_freprice">10</b>元-->
                    <!--                        </div>-->
                    <!--                    </div>-->
                </dl>
                <div class="clear"></div>

                <!--销量-->
                <ul class="tm-ind-panel">
                    <li class="tm-ind-item tm-ind-sellCount canClick">
                        <div class="tm-indcon">
                            <span class="tm-label">月销量</span><span class="tm-count">1015</span>
                        </div>
                    </li>
                    <li class="tm-ind-item tm-ind-sumCount canClick">
                        <div class="tm-indcon">
                            <span class="tm-label">累计销量</span><span class="tm-count">6015</span>
                        </div>
                    </li>
                    <li class="tm-ind-item tm-ind-reviewCount canClick tm-line3">
                        <div class="tm-indcon">
                            <span class="tm-label">累计评价</span><span class="tm-count">640</span>
                        </div>
                    </li>
                </ul>
                <div class="clear"></div>

                <!--各种规格-->
                <dl class="iteminfo_parameter sys_item_specpara">
                    <dt class="theme-login">
                        <div class="cart-title">
                            可选规格<span class="am-icon-angle-right"></span>
                        </div>
                    </dt>
                    <dd>
                        <!--操作页面-->

                        <div class="theme-popover-mask"></div>

                        <div class="theme-popover">
                            <div class="theme-span"></div>
                            <div class="theme-poptit">
                                <a href="javascript:;" title="关闭" class="close">×</a>
                            </div>
                            <div class="theme-popbod dform">
                                <form class="theme-signin" name="loginform" action=""
                                      method="post">

                                    <div class="theme-signin-left">

                                        <div class="theme-options">
                                            <div class="cart-title">口味</div>
                                            <ul class="taste-ul">

                                            </ul>
                                        </div>
                                        <!--                                        <div class="theme-options">-->
                                        <!--                                            <div class="cart-title">包装</div>-->
                                        <!--                                            <ul>-->
                                        <!--                                                <li class="sku-line selected">手袋单人份<i></i></li>-->
                                        <!--                                                <li class="sku-line">礼盒双人份<i></i></li>-->
                                        <!--                                                <li class="sku-line">全家福礼包<i></i></li>-->
                                        <!--                                            </ul>-->
                                        <!--                                        </div>-->
                                        <div class="theme-options">
                                            <div class="cart-title number">数量</div>
                    <dd>
                        <input id="min" class="am-btn am-btn-default" name="" type="button" value="-"/>
                        <input id="text_box" name="" type="text" temp="1" value="1" style="width: 30px;"/>
                        <input id="add" class="am-btn am-btn-default" name="" type="button" value="+"/>
                        <span id="Stock" class="tb-hidden">库存<span class="stock kucun">1000</span>件</span>
                        <script src="../HT/assets/layer/layer.js" type="text/javascript"></script>
                        <script type="text/javascript">

                            //点击加号
                            $("#add").click(function () {
                                if ($("#text_box").val() == $(".kucun").text() - 0) {
                                    $(this).attr("disable", "disable");
                                    return
                                }
                                $("#text_box").val($("#text_box").val());
                            });
                            //输入框发生改变
                            $("#text_box").change(function () {
                                var numberTemp = $(this).attr("temp");
                                //判断输入是否合理
                                if (!(/(^[1-9]\d*$)/.test($(this).val()))) {
                                    layer.msg('数据必须为大于0的整数!', {icon: 1, time: 1000});
                                    $(this).val(numberTemp);
                                    return;
                                }
                                //判断是否超库存
                                if ($(this).val() > $(".kucun").text() - 0) {
                                    layer.msg('已超库存!', {icon: 1, time: 1000});
                                    $(this).val(numberTemp);
                                    return;
                                }
                                $(this).attr("temp", $(this).val());
                            });

                        </script>
                    </dd>

            </div>
            <div class="clear"></div>

            <div class="btn-op">
                <div class="btn am-btn am-btn-warning">确认</div>
                <div class="btn close am-btn am-btn-warning">取消</div>
            </div>
        </div>
        <div class="theme-signin-right">
            <div class="img-info">
                <img src="../images/songzi.jpg"/>
            </div>
            <div class="text-info">
                <span class="J_Price price-now">¥39.00</span> <span
                    id="Stock" class="tb-hidden">库存<span class="stock">1000</span>件
												</span>
            </div>
        </div>

        </form>
    </div>
</div>
</dd>
</dl>
<div class="clear"></div>
<!--活动	-->
<div class="shopPromotion gold">
    <div class="hot">
        <dt class="tb-metatit">店铺优惠</dt>
        <div class="gold-list">
            <p>
                购物满2件打8折，满3件7折<span>点击领券<i class="am-icon-sort-down"></i></span>
            </p>
        </div>
    </div>
    <div class="clear"></div>
    <div class="coupon">
        <dt class="tb-metatit">优惠券</dt>
        <div class="gold-list">
            <ul>
                <li>125减5</li>
                <li>198减10</li>
                <li>298减20</li>
            </ul>
        </div>
    </div>
</div>
</div>

<div class="pay">
    <div class="pay-opt">
        <a href="home.html"><span class="am-icon-home am-icon-fw">首页</span></a>
        <a><span class="am-icon-heart am-icon-fw">收藏</span></a>

    </div>
    <li>
        <div class="clearfix tb-btn tb-btn-buy theme-login">
            <a id="LikBuy" title="点此按钮到下一步确认购买信息" href="#">立即购买</a>
        </div>
    </li>
    <li>
        <div class="clearfix tb-btn tb-btn-basket theme-login">
            <a id="LikBasket" title="加入购物车" href="#"><i></i>加入购物车</a>
        </div>
    </li>
</div>

</div>

<div class="clear"></div>

</div>

<!--优惠套装-->
<div class="match">
    <div class="match-title">优惠套装</div>
    <div class="match-comment">
        <ul class="like_list">
            <li>
                <div class="s_picBox">
                    <a class="s_pic" href="#"><img src="../images/cp.jpg"></a>
                </div>
                <a class="txt" target="_blank" href="#">萨拉米 1+1小鸡腿</a>
                <div class="info-box">
                    <span class="info-box-price">¥ 29.90</span> <span
                        class="info-original-price">￥ 199.00</span>
                </div>
            </li>
            <li class="plus_icon"><i>+</i></li>
            <li>
                <div class="s_picBox">
                    <a class="s_pic" href="#"><img src="../images/cp2.jpg"></a>
                </div>
                <a class="txt" target="_blank" href="#">ZEK 原味海苔</a>
                <div class="info-box">
                    <span class="info-box-price">¥ 8.90</span> <span
                        class="info-original-price">￥ 299.00</span>
                </div>
            </li>
            <li class="plus_icon"><i>=</i></li>
            <li class="total_price">
                <p class="combo_price">
                    <span class="c-title">套餐价:</span><span>￥35.00</span>
                </p>
                <p class="save_all">
                    共省:<span>￥463.00</span>
                </p> <a href="#" class="buy_now">立即购买</a>
            </li>
            <li class="plus_icon"><i class="am-icon-angle-right"></i></li>
        </ul>
    </div>
</div>
<div class="clear"></div>


<!-- introduce-->

<div class="introduce">
    <div class="browse">
        <div class="mc">
            <ul>
                <div class="mt">
                    <h2>看了又看</h2>
                </div>

                <li class="first">
                    <div class="p-img">
                        <a href="#"> <img class="" src="../images/browse1.jpg">
                        </a>
                    </div>
                    <div class="p-name">
                        <a href="#"> 【三只松鼠_开口松子】零食坚果特产炒货东北红松子原味 </a>
                    </div>
                    <div class="p-price">
                        <strong>￥35.90</strong>
                    </div>
                </li>
                <li>
                    <div class="p-img">
                        <a href="#"> <img class="" src="../images/browse1.jpg">
                        </a>
                    </div>
                    <div class="p-name">
                        <a href="#"> 【三只松鼠_开口松子】零食坚果特产炒货东北红松子原味 </a>
                    </div>
                    <div class="p-price">
                        <strong>￥35.90</strong>
                    </div>
                </li>
                <li>
                    <div class="p-img">
                        <a href="#"> <img class="" src="../images/browse1.jpg">
                        </a>
                    </div>
                    <div class="p-name">
                        <a href="#"> 【三只松鼠_开口松子】零食坚果特产炒货东北红松子原味 </a>
                    </div>
                    <div class="p-price">
                        <strong>￥35.90</strong>
                    </div>
                </li>
                <li>
                    <div class="p-img">
                        <a href="#"> <img class="" src="../images/browse1.jpg">
                        </a>
                    </div>
                    <div class="p-name">
                        <a href="#"> 【三只松鼠_开口松子】零食坚果特产炒货东北红松子原味 </a>
                    </div>
                    <div class="p-price">
                        <strong>￥35.90</strong>
                    </div>
                </li>
                <li>
                    <div class="p-img">
                        <a href="#"> <img class="" src="../images/browse1.jpg">
                        </a>
                    </div>
                    <div class="p-name">
                        <a href="#"> 【三只松鼠_开口松子218g】零食坚果特产炒货东北红松子原味 </a>
                    </div>
                    <div class="p-price">
                        <strong>￥35.90</strong>
                    </div>
                </li>

            </ul>
        </div>
    </div>
    <div class="introduceMain">
        <div class="am-tabs" data-am-tabs>
            <ul class="am-avg-sm-3 am-tabs-nav am-nav am-nav-tabs">
                <li class="am-active"><a href="#"> <span
                        class="index-needs-dt-txt">宝贝详情</span></a></li>

                <li><a href="#"> <span class="index-needs-dt-txt">全部评价</span></a>

                </li>

                <li><a href="#"> <span class="index-needs-dt-txt">猜你喜欢</span></a>
                </li>
            </ul>

            <div class="am-tabs-bd">

                <div class="am-tab-panel am-fade am-in am-active">
                    <div class="J_Brand">

                        <div class="attr-list-hd tm-clear">
                            <h4>产品参数：</h4>
                        </div>
                        <div class="clear"></div>
                        <ul id="J_AttrUL">

                        </ul>
                        <div class="clear"></div>
                    </div>

                    <div class="details">
                        <div class="attr-list-hd after-market-hd">
                            <h4>商品细节</h4>
                        </div>
                        <div class="twlistNews">
                            <img src="../images/tw1.jpg"/> <img src="../images/tw2.jpg"/>
                            <img src="../images/tw3.jpg"/> <img src="../images/tw4.jpg"/>
                            <img src="../images/tw5.jpg"/> <img src="../images/tw6.jpg"/>
                            <img src="../images/tw7.jpg"/>
                        </div>
                    </div>
                    <div class="clear"></div>

                </div>

                <div class="am-tab-panel am-fade">

                    <div class="actor-new">
                        <div class="rate">
                            <strong>100<span>%</span></strong><br> <span>好评度</span>
                        </div>
                        <dl>
                            <dt>买家印象</dt>
                            <dd class="p-bfc">
                                <q class="comm-tags"><span>味道不错</span><em>(2177)</em></q> <q
                                    class="comm-tags"><span>颗粒饱满</span><em>(1860)</em></q> <q
                                    class="comm-tags"><span>口感好</span><em>(1823)</em></q> <q
                                    class="comm-tags"><span>商品不错</span><em>(1689)</em></q> <q
                                    class="comm-tags"><span>香脆可口</span><em>(1488)</em></q> <q
                                    class="comm-tags"><span>个个开口</span><em>(1392)</em></q> <q
                                    class="comm-tags"><span>价格便宜</span><em>(1119)</em></q> <q
                                    class="comm-tags"><span>特价买的</span><em>(865)</em></q> <q
                                    class="comm-tags"><span>皮很薄</span><em>(831)</em></q>
                            </dd>
                        </dl>
                    </div>
                    <div class="clear"></div>
                    <div class="tb-r-filter-bar">
                        <ul class=" tb-taglist am-avg-sm-4">
                            <li class="tb-taglist-li tb-taglist-li-current">
                                <div class="comment-info">
                                    <span>全部评价</span> <span class="tb-tbcr-num">(32)</span>
                                </div>
                            </li>

                            <li class="tb-taglist-li tb-taglist-li-1">
                                <div class="comment-info">
                                    <span>好评</span> <span class="tb-tbcr-num">(32)</span>
                                </div>
                            </li>

                            <li class="tb-taglist-li tb-taglist-li-0">
                                <div class="comment-info">
                                    <span>中评</span> <span class="tb-tbcr-num">(32)</span>
                                </div>
                            </li>

                            <li class="tb-taglist-li tb-taglist-li--1">
                                <div class="comment-info">
                                    <span>差评</span> <span class="tb-tbcr-num">(32)</span>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="clear"></div>

                    <ul class="am-comments-list am-comments-list-flip">
                        <li class="am-comment">
                            <!-- 评论容器 --> <a href=""> <img class="am-comment-avatar"
                                                           src="../images/hwbn40x40.jpg"/> <!-- 评论者头像 -->
                        </a>

                            <div class="am-comment-main">
                                <!-- 评论内容容器 -->
                                <header class="am-comment-hd"> <!--<h3 class="am-comment-title">评论标题</h3>-->
                                    <div class="am-comment-meta">
                                        <!-- 评论元数据 -->
                                        <a href="#link-to-user" class="am-comment-author">b***1
                                            (匿名)</a>
                                        <!-- 评论者 -->
                                        评论于
                                        <time datetime="">2015年11月02日 17:46</time>
                                    </div>
                                </header>

                                <div class="am-comment-bd">
                                    <div class="tb-rev-item " data-id="255776406962">
                                        <div class="J_TbcRate_ReviewContent tb-tbcr-content ">
                                            摸起来丝滑柔软，不厚，没色差，颜色好看！买这个衣服还接到诈骗电话，我很好奇他们是怎么知道我买了这件衣服，并且还知道我的电话的！
                                        </div>
                                        <div class="tb-r-act-bar">颜色分类：柠檬黄&nbsp;&nbsp;尺码：S</div>
                                    </div>

                                </div>
                                <!-- 评论内容 -->
                            </div>
                        </li>
                        <li class="am-comment">
                            <!-- 评论容器 --> <a href=""> <img class="am-comment-avatar"
                                                           src="../images/hwbn40x40.jpg"/> <!-- 评论者头像 -->
                        </a>

                            <div class="am-comment-main">
                                <!-- 评论内容容器 -->
                                <header class="am-comment-hd"> <!--<h3 class="am-comment-title">评论标题</h3>-->
                                    <div class="am-comment-meta">
                                        <!-- 评论元数据 -->
                                        <a href="#link-to-user" class="am-comment-author">l***4
                                            (匿名)</a>
                                        <!-- 评论者 -->
                                        评论于
                                        <time datetime="">2015年10月28日 11:33</time>
                                    </div>
                                </header>

                                <div class="am-comment-bd">
                                    <div class="tb-rev-item " data-id="255095758792">
                                        <div class="J_TbcRate_ReviewContent tb-tbcr-content ">
                                            没有色差，很暖和……美美的
                                        </div>
                                        <div class="tb-r-act-bar">颜色分类：蓝调灰&nbsp;&nbsp;尺码：2XL</div>
                                    </div>

                                </div>
                                <!-- 评论内容 -->
                            </div>
                        </li>
                        <li class="am-comment">
                            <!-- 评论容器 --> <a href=""> <img class="am-comment-avatar"
                                                           src="../images/hwbn40x40.jpg"/> <!-- 评论者头像 -->
                        </a>

                            <div class="am-comment-main">
                                <!-- 评论内容容器 -->
                                <header class="am-comment-hd"> <!--<h3 class="am-comment-title">评论标题</h3>-->
                                    <div class="am-comment-meta">
                                        <!-- 评论元数据 -->
                                        <a href="#link-to-user" class="am-comment-author">b***1
                                            (匿名)</a>
                                        <!-- 评论者 -->
                                        评论于
                                        <time datetime="">2015年11月02日 17:46</time>
                                    </div>
                                </header>

                                <div class="am-comment-bd">
                                    <div class="tb-rev-item " data-id="255776406962">
                                        <div class="J_TbcRate_ReviewContent tb-tbcr-content ">
                                            摸起来丝滑柔软，不厚，没色差，颜色好看！买这个衣服还接到诈骗电话，我很好奇他们是怎么知道我买了这件衣服，并且还知道我的电话的！
                                        </div>
                                        <div class="tb-r-act-bar">颜色分类：柠檬黄&nbsp;&nbsp;尺码：S</div>
                                    </div>

                                </div>
                                <!-- 评论内容 -->
                            </div>
                        </li>
                        <li class="am-comment">
                            <!-- 评论容器 --> <a href=""> <img class="am-comment-avatar"
                                                           src="../images/hwbn40x40.jpg"/> <!-- 评论者头像 -->
                        </a>

                            <div class="am-comment-main">
                                <!-- 评论内容容器 -->
                                <header class="am-comment-hd"> <!--<h3 class="am-comment-title">评论标题</h3>-->
                                    <div class="am-comment-meta">
                                        <!-- 评论元数据 -->
                                        <a href="#link-to-user" class="am-comment-author">h***n
                                            (匿名)</a>
                                        <!-- 评论者 -->
                                        评论于
                                        <time datetime="">2015年11月25日 12:48</time>
                                    </div>
                                </header>

                                <div class="am-comment-bd">
                                    <div class="tb-rev-item " data-id="258040417670">
                                        <div class="J_TbcRate_ReviewContent tb-tbcr-content ">
                                            式样不错，初冬穿
                                        </div>
                                        <div class="tb-r-act-bar">颜色分类：柠檬黄&nbsp;&nbsp;尺码：L</div>
                                    </div>
                                </div>
                                <!-- 评论内容 -->
                            </div>
                        </li>

                        <li class="am-comment">
                            <!-- 评论容器 --> <a href=""> <img class="am-comment-avatar"
                                                           src="../images/hwbn40x40.jpg"/> <!-- 评论者头像 -->
                        </a>

                            <div class="am-comment-main">
                                <!-- 评论内容容器 -->
                                <header class="am-comment-hd"> <!--<h3 class="am-comment-title">评论标题</h3>-->
                                    <div class="am-comment-meta">
                                        <!-- 评论元数据 -->
                                        <a href="#link-to-user" class="am-comment-author">b***1
                                            (匿名)</a>
                                        <!-- 评论者 -->
                                        评论于
                                        <time datetime="">2015年11月02日 17:46</time>
                                    </div>
                                </header>

                                <div class="am-comment-bd">
                                    <div class="tb-rev-item " data-id="255776406962">
                                        <div class="J_TbcRate_ReviewContent tb-tbcr-content ">
                                            摸起来丝滑柔软，不厚，没色差，颜色好看！买这个衣服还接到诈骗电话，我很好奇他们是怎么知道我买了这件衣服，并且还知道我的电话的！
                                        </div>
                                        <div class="tb-r-act-bar">颜色分类：柠檬黄&nbsp;&nbsp;尺码：S</div>
                                    </div>

                                </div>
                                <!-- 评论内容 -->
                            </div>
                        </li>
                        <li class="am-comment">
                            <!-- 评论容器 --> <a href=""> <img class="am-comment-avatar"
                                                           src="../images/hwbn40x40.jpg"/> <!-- 评论者头像 -->
                        </a>

                            <div class="am-comment-main">
                                <!-- 评论内容容器 -->
                                <header class="am-comment-hd"> <!--<h3 class="am-comment-title">评论标题</h3>-->
                                    <div class="am-comment-meta">
                                        <!-- 评论元数据 -->
                                        <a href="#link-to-user" class="am-comment-author">l***4
                                            (匿名)</a>
                                        <!-- 评论者 -->
                                        评论于
                                        <time datetime="">2015年10月28日 11:33</time>
                                    </div>
                                </header>

                                <div class="am-comment-bd">
                                    <div class="tb-rev-item " data-id="255095758792">
                                        <div class="J_TbcRate_ReviewContent tb-tbcr-content ">
                                            没有色差，很暖和……美美的
                                        </div>
                                        <div class="tb-r-act-bar">颜色分类：蓝调灰&nbsp;&nbsp;尺码：2XL</div>
                                    </div>

                                </div>
                                <!-- 评论内容 -->
                            </div>
                        </li>
                        <li class="am-comment">
                            <!-- 评论容器 --> <a href=""> <img class="am-comment-avatar"
                                                           src="../images/hwbn40x40.jpg"/> <!-- 评论者头像 -->
                        </a>

                            <div class="am-comment-main">
                                <!-- 评论内容容器 -->
                                <header class="am-comment-hd"> <!--<h3 class="am-comment-title">评论标题</h3>-->
                                    <div class="am-comment-meta">
                                        <!-- 评论元数据 -->
                                        <a href="#link-to-user" class="am-comment-author">b***1
                                            (匿名)</a>
                                        <!-- 评论者 -->
                                        评论于
                                        <time datetime="">2015年11月02日 17:46</time>
                                    </div>
                                </header>

                                <div class="am-comment-bd">
                                    <div class="tb-rev-item " data-id="255776406962">
                                        <div class="J_TbcRate_ReviewContent tb-tbcr-content ">
                                            摸起来丝滑柔软，不厚，没色差，颜色好看！买这个衣服还接到诈骗电话，我很好奇他们是怎么知道我买了这件衣服，并且还知道我的电话的！
                                        </div>
                                        <div class="tb-r-act-bar">颜色分类：柠檬黄&nbsp;&nbsp;尺码：S</div>
                                    </div>

                                </div>
                                <!-- 评论内容 -->
                            </div>
                        </li>
                        <li class="am-comment">
                            <!-- 评论容器 --> <a href=""> <img class="am-comment-avatar"
                                                           src="../images/hwbn40x40.jpg"/> <!-- 评论者头像 -->
                        </a>

                            <div class="am-comment-main">
                                <!-- 评论内容容器 -->
                                <header class="am-comment-hd"> <!--<h3 class="am-comment-title">评论标题</h3>-->
                                    <div class="am-comment-meta">
                                        <!-- 评论元数据 -->
                                        <a href="#link-to-user" class="am-comment-author">h***n
                                            (匿名)</a>
                                        <!-- 评论者 -->
                                        评论于
                                        <time datetime="">2015年11月25日 12:48</time>
                                    </div>
                                </header>

                                <div class="am-comment-bd">
                                    <div class="tb-rev-item " data-id="258040417670">
                                        <div class="J_TbcRate_ReviewContent tb-tbcr-content ">
                                            式样不错，初冬穿
                                        </div>
                                        <div class="tb-r-act-bar">颜色分类：柠檬黄&nbsp;&nbsp;尺码：L</div>
                                    </div>
                                </div>
                                <!-- 评论内容 -->
                            </div>
                        </li>
                        <li class="am-comment">
                            <!-- 评论容器 --> <a href=""> <img class="am-comment-avatar"
                                                           src="../images/hwbn40x40.jpg"/> <!-- 评论者头像 -->
                        </a>

                            <div class="am-comment-main">
                                <!-- 评论内容容器 -->
                                <header class="am-comment-hd"> <!--<h3 class="am-comment-title">评论标题</h3>-->
                                    <div class="am-comment-meta">
                                        <!-- 评论元数据 -->
                                        <a href="#link-to-user" class="am-comment-author">b***1
                                            (匿名)</a>
                                        <!-- 评论者 -->
                                        评论于
                                        <time datetime="">2015年11月02日 17:46</time>
                                    </div>
                                </header>

                                <div class="am-comment-bd">
                                    <div class="tb-rev-item " data-id="255776406962">
                                        <div class="J_TbcRate_ReviewContent tb-tbcr-content ">
                                            摸起来丝滑柔软，不厚，没色差，颜色好看！买这个衣服还接到诈骗电话，我很好奇他们是怎么知道我买了这件衣服，并且还知道我的电话的！
                                        </div>
                                        <div class="tb-r-act-bar">颜色分类：柠檬黄&nbsp;&nbsp;尺码：S</div>
                                    </div>

                                </div>
                                <!-- 评论内容 -->
                            </div>
                        </li>
                        <li class="am-comment">
                            <!-- 评论容器 --> <a href=""> <img class="am-comment-avatar"
                                                           src="../images/hwbn40x40.jpg"/> <!-- 评论者头像 -->
                        </a>

                            <div class="am-comment-main">
                                <!-- 评论内容容器 -->
                                <header class="am-comment-hd"> <!--<h3 class="am-comment-title">评论标题</h3>-->
                                    <div class="am-comment-meta">
                                        <!-- 评论元数据 -->
                                        <a href="#link-to-user" class="am-comment-author">l***4
                                            (匿名)</a>
                                        <!-- 评论者 -->
                                        评论于
                                        <time datetime="">2015年10月28日 11:33</time>
                                    </div>
                                </header>

                                <div class="am-comment-bd">
                                    <div class="tb-rev-item " data-id="255095758792">
                                        <div class="J_TbcRate_ReviewContent tb-tbcr-content ">
                                            没有色差，很暖和……美美的
                                        </div>
                                        <div class="tb-r-act-bar">颜色分类：蓝调灰&nbsp;&nbsp;尺码：2XL</div>
                                    </div>

                                </div>
                                <!-- 评论内容 -->
                            </div>
                        </li>
                        <li class="am-comment">
                            <!-- 评论容器 --> <a href=""> <img class="am-comment-avatar"
                                                           src="../images/hwbn40x40.jpg"/> <!-- 评论者头像 -->
                        </a>

                            <div class="am-comment-main">
                                <!-- 评论内容容器 -->
                                <header class="am-comment-hd"> <!--<h3 class="am-comment-title">评论标题</h3>-->
                                    <div class="am-comment-meta">
                                        <!-- 评论元数据 -->
                                        <a href="#link-to-user" class="am-comment-author">b***1
                                            (匿名)</a>
                                        <!-- 评论者 -->
                                        评论于
                                        <time datetime="">2015年11月02日 17:46</time>
                                    </div>
                                </header>

                                <div class="am-comment-bd">
                                    <div class="tb-rev-item " data-id="255776406962">
                                        <div class="J_TbcRate_ReviewContent tb-tbcr-content ">
                                            摸起来丝滑柔软，不厚，没色差，颜色好看！买这个衣服还接到诈骗电话，我很好奇他们是怎么知道我买了这件衣服，并且还知道我的电话的！
                                        </div>
                                        <div class="tb-r-act-bar">颜色分类：柠檬黄&nbsp;&nbsp;尺码：S</div>
                                    </div>

                                </div>
                                <!-- 评论内容 -->
                            </div>
                        </li>
                        <li class="am-comment">
                            <!-- 评论容器 --> <a href=""> <img class="am-comment-avatar"
                                                           src="../images/hwbn40x40.jpg"/> <!-- 评论者头像 -->
                        </a>

                            <div class="am-comment-main">
                                <!-- 评论内容容器 -->
                                <header class="am-comment-hd"> <!--<h3 class="am-comment-title">评论标题</h3>-->
                                    <div class="am-comment-meta">
                                        <!-- 评论元数据 -->
                                        <a href="#link-to-user" class="am-comment-author">h***n
                                            (匿名)</a>
                                        <!-- 评论者 -->
                                        评论于
                                        <time datetime="">2015年11月25日 12:48</time>
                                    </div>
                                </header>

                                <div class="am-comment-bd">
                                    <div class="tb-rev-item " data-id="258040417670">
                                        <div class="J_TbcRate_ReviewContent tb-tbcr-content ">
                                            式样不错，初冬穿
                                        </div>
                                        <div class="tb-r-act-bar">颜色分类：柠檬黄&nbsp;&nbsp;尺码：L</div>
                                    </div>
                                </div>
                                <!-- 评论内容 -->
                            </div>
                        </li>

                    </ul>

                    <div class="clear"></div>

                    <!--分页 -->
                    <ul class="am-pagination am-pagination-right">
                        <li class="am-disabled"><a href="#">&laquo;</a></li>
                        <li class="am-active"><a href="#">1</a></li>
                        <li><a href="#">2</a></li>
                        <li><a href="#">3</a></li>
                        <li><a href="#">4</a></li>
                        <li><a href="#">5</a></li>
                        <li><a href="#">&raquo;</a></li>
                    </ul>
                    <div class="clear"></div>

                    <div class="tb-reviewsft">
                        <div class="tb-rate-alert type-attention">
                            购买前请查看该商品的 <a href="#" target="_blank">购物保障</a>，明确您的售后保障权益。
                        </div>
                    </div>

                </div>

                <div class="am-tab-panel am-fade">
                    <div class="like">
                        <ul class="am-avg-sm-2 am-avg-md-3 am-avg-lg-4 boxes">
                            <li>
                                <div class="i-pic limit">
                                    <img src="../images/imgsearch1.jpg"/>
                                    <p>
                                        【良品铺子_开口松子】零食坚果特产炒货 <span>东北红松子奶油味</span>
                                    </p>
                                    <p class="price fl">
                                        <b>¥</b> <strong>298.00</strong>
                                    </p>
                                </div>
                            </li>
                            <li>
                                <div class="i-pic limit">
                                    <img src="../images/imgsearch1.jpg"/>
                                    <p>
                                        【良品铺子_开口松子】零食坚果特产炒货 <span>东北红松子奶油味</span>
                                    </p>
                                    <p class="price fl">
                                        <b>¥</b> <strong>298.00</strong>
                                    </p>
                                </div>
                            </li>
                            <li>
                                <div class="i-pic limit">
                                    <img src="../images/imgsearch1.jpg"/>
                                    <p>
                                        【良品铺子_开口松子】零食坚果特产炒货 <span>东北红松子奶油味</span>
                                    </p>
                                    <p class="price fl">
                                        <b>¥</b> <strong>298.00</strong>
                                    </p>
                                </div>
                            </li>
                            <li>
                                <div class="i-pic limit">
                                    <img src="../images/imgsearch1.jpg"/>
                                    <p>
                                        【良品铺子_开口松子】零食坚果特产炒货 <span>东北红松子奶油味</span>
                                    </p>
                                    <p class="price fl">
                                        <b>¥</b> <strong>298.00</strong>
                                    </p>
                                </div>
                            </li>
                            <li>
                                <div class="i-pic limit">
                                    <img src="../images/imgsearch1.jpg"/>
                                    <p>
                                        【良品铺子_开口松子】零食坚果特产炒货 <span>东北红松子奶油味</span>
                                    </p>
                                    <p class="price fl">
                                        <b>¥</b> <strong>298.00</strong>
                                    </p>
                                </div>
                            </li>
                            <li>
                                <div class="i-pic limit">
                                    <img src="../images/imgsearch1.jpg"/>
                                    <p>
                                        【良品铺子_开口松子】零食坚果特产炒货 <span>东北红松子奶油味</span>
                                    </p>
                                    <p class="price fl">
                                        <b>¥</b> <strong>298.00</strong>
                                    </p>
                                </div>
                            </li>
                            <li>
                                <div class="i-pic limit">
                                    <img src="../images/imgsearch1.jpg"/>
                                    <p>
                                        【良品铺子_开口松子】零食坚果特产炒货 <span>东北红松子奶油味</span>
                                    </p>
                                    <p class="price fl">
                                        <b>¥</b> <strong>298.00</strong>
                                    </p>
                                </div>
                            </li>
                            <li>
                                <div class="i-pic limit">
                                    <img src="../images/imgsearch1.jpg"/>
                                    <p>
                                        【良品铺子_开口松子】零食坚果特产炒货 <span>东北红松子奶油味</span>
                                    </p>
                                    <p class="price fl">
                                        <b>¥</b> <strong>298.00</strong>
                                    </p>
                                </div>
                            </li>
                            <li>
                                <div class="i-pic limit">
                                    <img src="../images/imgsearch1.jpg"/>
                                    <p>
                                        【良品铺子_开口松子】零食坚果特产炒货 <span>东北红松子奶油味</span>
                                    </p>
                                    <p class="price fl">
                                        <b>¥</b> <strong>298.00</strong>
                                    </p>
                                </div>
                            </li>
                            <li>
                                <div class="i-pic limit">
                                    <img src="../images/imgsearch1.jpg"/>
                                    <p>
                                        【良品铺子_开口松子】零食坚果特产炒货 <span>东北红松子奶油味</span>
                                    </p>
                                    <p class="price fl">
                                        <b>¥</b> <strong>298.00</strong>
                                    </p>
                                </div>
                            </li>
                            <li>
                                <div class="i-pic limit">
                                    <img src="../images/imgsearch1.jpg"/>
                                    <p>
                                        【良品铺子_开口松子】零食坚果特产炒货 <span>东北红松子奶油味</span>
                                    </p>
                                    <p class="price fl">
                                        <b>¥</b> <strong>298.00</strong>
                                    </p>
                                </div>
                            </li>
                            <li>
                                <div class="i-pic limit">
                                    <img src="../images/imgsearch1.jpg"/>
                                    <p>
                                        【良品铺子_开口松子】零食坚果特产炒货 <span>东北红松子奶油味</span>
                                    </p>
                                    <p class="price fl">
                                        <b>¥</b> <strong>298.00</strong>
                                    </p>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="clear"></div>

                    <!--分页 -->
                    <ul class="am-pagination am-pagination-right">
                        <li class="am-disabled"><a href="#">&laquo;</a></li>
                        <li class="am-active"><a href="#">1</a></li>
                        <li><a href="#">2</a></li>
                        <li><a href="#">3</a></li>
                        <li><a href="#">4</a></li>
                        <li><a href="#">5</a></li>
                        <li><a href="#">&raquo;</a></li>
                    </ul>
                    <div class="clear"></div>

                </div>

            </div>

        </div>

        <div class="clear"></div>

        <div class="footer">
            <div class="footer-hd">
                <p>
                    <a href="#">卓鼎教育</a> <b>|</b> <a href="#">商城首页</a> <b>|</b> <a
                        href="#">支付宝</a> <b>|</b> <a href="#">物流</a>
                </p>
            </div>
            <div class="footer-bd">
                <p style="text-align: center;">
                    <a href="#">合作伙伴</a> <a href="#">联系我们</a> <a href="#">网站地图</a> <em
                        style="text-align: center;">© 2015-2025 zking 版权所有</em>
                </p>
            </div>
        </div>
    </div>

</div>
</div>
<!--菜单 -->
<div class=tip>
    <div id="sidebar">
        <div id="wrap">
            <div id="prof" class="item">
                <a href="#"> <span class="setting"></span>
                </a>
                <div class="ibar_login_box status_login">
                    <div class="avatar_box">
                        <p class="avatar_imgbox">
                            <img src="../images/no-img_mid_.jpg"/>
                        </p>
                        <ul class="user_info">
                            <li>用户名：sl1903</li>
                            <li>级&nbsp;别：普通会员</li>
                        </ul>
                    </div>
                    <div class="login_btnbox">
                        <a href="#" class="login_order">我的订单</a> <a href="#"
                                                                    class="login_favorite">我的收藏</a>
                    </div>
                    <i class="icon_arrow_white"></i>
                </div>

            </div>
            <div id="shopCart" class="item">
                <a href="#"> <span class="message"></span>
                </a>
                <p>购物车</p>
                <p class="cart_num">0</p>
            </div>
            <div id="asset" class="item">
                <a href="#"> <span class="view"></span>
                </a>
                <div class="mp_tooltip">
                    我的资产 <i class="icon_arrow_right_black"></i>
                </div>
            </div>

            <div id="foot" class="item">
                <a href="#"> <span class="zuji"></span>
                </a>
                <div class="mp_tooltip">
                    我的足迹 <i class="icon_arrow_right_black"></i>
                </div>
            </div>

            <div id="brand" class="item">
                <a href="#"> <span class="wdsc"><img
                        src="../images/wdsc.png"/></span>
                </a>
                <div class="mp_tooltip">
                    我的收藏 <i class="icon_arrow_right_black"></i>
                </div>
            </div>

            <div id="broadcast" class="item">
                <a href="#"> <span class="chongzhi"><img
                        src="../images/chongzhi.png"/></span>
                </a>
                <div class="mp_tooltip">
                    我要充值 <i class="icon_arrow_right_black"></i>
                </div>
            </div>

            <div class="quick_toggle">
                <li class="qtitem"><a href="#"><span class="kfzx"></span></a>
                    <div class="mp_tooltip">
                        客服中心<i class="icon_arrow_right_black"></i>
                    </div>
                </li>
                <!--二维码 -->
                <li class="qtitem"><a href="#none"><span
                        class="mpbtn_qrcode"></span></a>
                    <div class="mp_qrcode" style="display: none;">
                        <img src="../images/weixin_code_145.png"/><i
                            class="icon_arrow_white"></i>
                    </div>
                </li>
                <li class="qtitem"><a href="#top" class="return_top"><span
                        class="top"></span></a></li>
            </div>

            <!--回到顶部 -->
            <div id="quick_links_pop" class="quick_links_pop hide"></div>

        </div>

    </div>
    <div id="prof-content" class="nav-content">
        <div class="nav-con-close">
            <i class="am-icon-angle-right am-icon-fw"></i>
        </div>
        <div>我</div>
    </div>
    <div id="shopCart-content" class="nav-content">
        <div class="nav-con-close">
            <i class="am-icon-angle-right am-icon-fw"></i>
        </div>
        <div>购物车</div>
    </div>
    <div id="asset-content" class="nav-content">
        <div class="nav-con-close">
            <i class="am-icon-angle-right am-icon-fw"></i>
        </div>
        <div>资产</div>

        <div class="ia-head-list">
            <a href="#" target="_blank" class="pl">
                <div class="num">0</div>
                <div class="text">优惠券</div>
            </a> <a href="#" target="_blank" class="pl">
            <div class="num">0</div>
            <div class="text">红包</div>
        </a> <a href="#" target="_blank" class="pl money">
            <div class="num">￥0</div>
            <div class="text">余额</div>
        </a>
        </div>

    </div>
    <div id="foot-content" class="nav-content">
        <div class="nav-con-close">
            <i class="am-icon-angle-right am-icon-fw"></i>
        </div>
        <div>足迹</div>
    </div>
    <div id="brand-content" class="nav-content">
        <div class="nav-con-close">
            <i class="am-icon-angle-right am-icon-fw"></i>
        </div>
        <div>收藏</div>
    </div>
    <div id="broadcast-content" class="nav-content">
        <div class="nav-con-close">
            <i class="am-icon-angle-right am-icon-fw"></i>
        </div>
        <div>充值</div>
    </div>
</div>

</body>
<script type="text/javascript">
    //读取url中的参数
    function getQueryVariable(variable) {
        var query = window.location.search.substring(1);
        var vars = query.split("&");
        for (var i = 0; i < vars.length; i++) {
            var pair = vars[i].split("=");
            if (pair[0] == variable) {
                return decodeURIComponent(pair[1]);
            }
        }
        return false;
    }

    //获取商品编号
    var shopID = getQueryVariable("shopID");

    function getGoods() {
        $.ajax({
            url: "http://localhost:8080/SnacksShop/public.do?type=introduction",
            type: "post",
            data: {
                shopID: shopID
            },
            crossDomain: true,
            xhrFields: {
                withCredentials: true
            },
            type: "post",
            success: function (data) {
                console.log(data);
                data = JSON.parse(data);
                printGoods(data.data);
            },
            error: function (data) {
            }
        });
    }

    //获取 JSON 数组长度：
    function getJsonLength(json) {
        var jsonLength = 0;
        for (var i in json) {
            jsonLength++;
        }
        return jsonLength;
    }

    function printGoods(data) {
        var data_length = getJsonLength(data);
        var discount = 1;
        //修改名称
        $(".h1-ti").text(data[0].goodsName);
        //判断活动
        if (data[1] != "noActivity") {
            //获取当前时间戳
            var timestamp = new Date().getTime();
            if (timestamp < data[1].activityEndTime.time) {
                discount = data[1].activityDisCount;
            }
        }
        //口味
        var taste_length = getJsonLength(data[2]);
        html = '';
        for (var i = 0; i < taste_length; i++) {
            if (i == 0) {
                html += '<li class="sku-line selected"';
            } else {
                html += '<li class="sku-line"';
            }
            html += ' tasteID=' + data[2][i].tasteId + ' img=' + data[2][i].tasteImg + ' price=' + data[2][i].tastePrice + ' number=' + data[2][i].tasteNumber;
            html += '>'
            html += data[2][i].tasteName + '<i></i></li>';
        }
        $(".taste-ul").html(html);

        //修改价格和库存
        if (discount == 1) {
            $(".iteminfo_mktprice").remove();
            $(".sys_item_price").text($(".selected").attr("price"));
        } else {
            $(".sys_item_price").text(($(".selected").attr("price") * discount).toFixed(2));
            $(".sys_item_mktprice").text($(".selected").attr("price"));
        }

        //修改库存
        $(".kucun").text($(".selected").attr("number"));

        //修改图片
        $(".a-img").attr("href", $(".selected").attr("img"));
        $(".jqzoom").attr("src", $(".selected").attr("img"));
        $(".jqzoom").attr("rel", $(".selected").attr("img"));

        $(".sku-line").click(function () {
            $(".sku-line").removeClass("selected");
            $(this).addClass("selected");
            //修改价格和库存
            if (discount == 1) {
                $(".iteminfo_mktprice").remove();
                $(".sys_item_price").text($(".selected").attr("price"));
            } else {
                $(".sys_item_price").text(($(".selected").attr("price") * discount).toFixed(2));
                $(".sys_item_mktprice").text($(".selected").attr("price"));
            }
            //修改库存
            $(".kucun").text($(".selected").attr("number"));
            //修改图片
            $(".a-img").attr("href", $(".selected").attr("img"));
            $(".jqzoom").attr("src", $(".selected").attr("img"));
            $(".jqzoom").attr("rel", $(".selected").attr("img"));
        });
        //修改底层图片
        $(".img1").attr("src", data[0].goodsImg1);
        $(".img1").attr("mid", data[0].goodsImg1);
        $(".img1").attr("big", data[0].goodsImg1);
        $(".img2").attr("src", data[0].goodsImg1);
        $(".img2").attr("mid", data[0].goodsImg1);
        $(".img2").attr("big", data[0].goodsImg1);
        $(".img3").attr("src", data[0].goodsImg1);
        $(".img3").attr("mid", data[0].goodsImg1);
        $(".img3").attr("big", data[0].goodsImg1);
        $(".img4").attr("src", data[0].goodsImg1);
        $(".img4").attr("mid", data[0].goodsImg1);
        $(".img4").attr("big", data[0].goodsImg1);
        $(".img5").attr("src", data[0].goodsImg1);
        $(".img5").attr("mid", data[0].goodsImg1);
        $(".img5").attr("big", data[0].goodsImg1);
        //判断商品是否有效
        if (data[0].goodsStatus == 0) {
            $("#LikBuy").text("已下架");
            $("#LikBuy").attr("href", "#");
            $("#LikBasket").remove();
        }else {
            //去除立即购买按钮
            $("#LikBuy").remove();
        }
        //商品参数
        html = '';
        html += '<li title="">配料表:&nbsp;' + data[0].goodsDosing + '</li>';
        html += '<li title="">原料表:&nbsp;' + data[0].goodsRaw + '</li>';
        html += '<li title="">产地:&nbsp;' + data[0].goodsMake + '</li>';
        html += '<li title="">产品规格:&nbsp;' + data[0].goodsSize + '</li>';
        html += '<li title="">保质期:&nbsp;' + data[0].goodsDead + '</li>';
        html += '<li title="">产品标准号:&nbsp;' + data[0].goodsStandardCode + '</li>';
        html += '<li title="">产品生产许可证编号:&nbsp;' + data[0].goodsProduceCode + '</li>';
        html += '<li title="">存储方法:&nbsp;' + data[0].goodsStorage + '</li>';
        html += '<li title="">食用方法:&nbsp;' + data[0].goodsEat + '</li>';
        $("#J_AttrUL").html(html);
    }

    getGoods();

    //点击立即购买按钮
    $("#LikBuy").click(function () {

    });

    var islogin = true;

    //判断是否登录
    function isLogin() {
        $.ajax({
            url: "http://localhost:8080/SnacksShop/user.do?type=isLogin",
            type: "post",
            crossDomain: true,
            xhrFields: {
                withCredentials: true
            },
            success: function (data) {
                if (data == "101") {
                    location.href = "./login.html";
                    islogin = false;
                }
                data = JSON.parse(data); //解析为Json格式
                $("#user-login-label").hide(); //隐藏登录标签
                $("#userWellcome").html("欢迎登录&nbsp;&nbsp;<span style='color: #ff0000'>" + data.requestAPI.object.userName + "</span>");
                $("#unlogin-box-guanggao").hide();//隐藏
                $("#userImg-cebian").attr("src", data.requestAPI.object.userImg);//显示侧边用户头像
                $("#userName-cebian").text("用户名:" + data.requestAPI.object.userName);//显示侧边用户名
            },
            error: function () {
            }
        })
    }


    //点击加入购物车
    $("#LikBasket").click(function () {
        isLogin();
        if (!islogin)
            return;
        $.ajax({
            url: "http://localhost:8080/SnacksShop/user.do?type=addShopCar",
            type: "post",
            data: {
                shopID: shopID,
                tasteID: $(".selected").attr("tasteID"),
                number: $("#text_box").val(),
                price: $(".sys_item_price").text()
            },
            crossDomain: true,
            xhrFields: {
                withCredentials: true
            },
            type: "post",
            success: function (data) {
                console.log(data);

                if (data == "true") {
                    layer.msg('添加成功!', {icon: 1, time: 1000});
                } else
                    layer.msg('网络异常!', {icon: 1, time: 1000});
            },
            error: function (data) {
            }
        });
    });


</script>
</html>